package com.zjf.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zjf.entity.Cart;
import com.zjf.mapper.CartMapper;
import com.zjf.service.ICartService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class CartServiceImpl extends ServiceImpl<CartMapper, Cart> implements ICartService {
    @Resource
    private CartMapper cartMapper;
    @Override
    public List<Cart> listCart(String userId, Integer businessId) {
        return cartMapper.listCart(userId,businessId);
    }

    @Override
    public int saveCart(Cart cart) {return cartMapper.saveCart(cart);}

    @Override
    public int updateCart(Cart cart) {
        return cartMapper.updateCart(cart);
    }

    @Override
    public int removeCart(Cart cart) {
        return cartMapper.removeCart(cart);
    }
}
